export const user = (state = {
  loginState: false,
  username: 'wudaxun',
  token: '112233445566'
}, action) => {
  switch (action.type) {
    case 'CHANGE_LOGIN_STATE':
      return Object.assign({}, state, { loginState: action.payload })
    case 'CHANGE_USERNAME':
      return Object.assign({}, state, { username: action.payload })
    case 'CHANGE_TOKEN':
      return Object.assign({}, state, { token: action.payload })
    default:
      return state
  }
}